for i in range(19):
    for j in range(19):
        print("X", i, "_", j, ": Die { \n\t@display(\"p=", 1145 + i * 150, ",", 342 + j * 150, "\");\n }", sep='')

for i in range(2, 16):
    print("A", i, "_0.south <--> DatarateChannel <--> X", i, "_1.north;", sep='')

for i in range(2, 16):
    print("A0_", i, ".east <--> DatarateChannel <--> X1_", i, ".west;", sep='')

for i in range(2, 16):
    print("X16_", i, ".east <--> DatarateChannel <--> A17_", i, ".west;", sep='')

for i in range(2, 16):
    print("X", i, "_16.south <--> DatarateChannel <--> A", i, "_17.north;", sep='')

for i in range(1, 16):
    for j in range(2, 16):
        print("X", j, "_", i, ".south <--> DatarateChannel <--> X", j, "_", i + 1, ".north;", sep='')
    print()
print("**********************")

for i in range(1, 16):
    for j in range(2, 16):
        print("X", i, "_", j, ".east <--> DatarateChannel <--> X", i + 1, "_", j, ".west;", sep='')

print("66666666666666666666")
for i in range(2, 15):
    print("X", i, "_16.east <--> DatarateChannel <--> X", i + 1, "_16.west;", sep='')

print("777777777777777777")
for i in range(2, 15):
    print("X16_", i, ".south <--> DatarateChannel <--> X16_", i + 1, ".north;", sep='')

for i in range(2, 16):
    print("oA", i, "17: Outer { \n\t@display(\"p=", 1445 + (i - 2) * 150, ",", 3042, "\");\n }", sep='')

print("88888888888888888")

for i in range(2, 16):
    print("oA17", i, ": Outer { \n\t@display(\"p=", 3845, ",", 642 + (i - 2) * 150, "\");\n }", sep='')

for i in range(2, 16):
    print("oA", i, "17.outer_port <--> DatarateChannel <--> A", i, "_17.north;", sep='')
print()
for i in range(2, 16):
    print("oA17", i, ".outer_port <--> DatarateChannel <--> A17_", i, ".east;", sep='')
print()
print()

for i in range(1, 17):
    for j in range(1, 17):
        print("Mesh_switch.X", j, "_", i, ".id = \"X", j, "_", i, "\"", sep='')

print()
print()

for i in range(1, 17):
    for j in range(1, 17):
        print("Mesh_switch.X", i, "_", j, ".x = ", i, sep='')
        print("Mesh_switch.X", i, "_", j, ".y = ", j, sep='')
    print()

for i in range(2, 16):
    print("{", i, ",17},", sep='', end='')

print()
print()

for i in range(2, 16):
    print("Mesh_switch.oA", i, "17.x = ", i, sep='')
    print("Mesh_switch.oA", i, "17.y = 17", sep='')
